
const env = require('../config/env')
module.exports.checkUpdate = function () {
    return new Promise((res,rej)=>{
        console.log('checkUpdate')

        var request = require('request');
        var options = {
        'method': 'POST',
        'url': 'http://localhost:8182/xrpa/anonymous/api/app/version',
        'headers': {
            'Content-Type': 'application/json'
        },
        body: JSON.stringify({
            "platform": "Mac"
        })

        };
        request(options, function (error, response) {
            if (error) rej(new Error(error));
            res(JSON.parse(response.body));
        });

    })
    
}